.class public Lcom/instagram/android/c2dm/a/a;
.super Ljava/lang/Object;
.source "DirectShareNotificationDelegate.java"

# interfaces
.implements Lcom/instagram/k/g;


# annotations
.annotation system Ldalvik/annotation/Signature;
    value = {
        "Ljava/lang/Object;",
        "Lcom/instagram/k/g",
        "<",
        "Lcom/instagram/android/c2dm/d;",
        ">;"
    }
.end annotation


# static fields
.field private static final a:Ljava/lang/Class;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/lang/Class",
            "<*>;"
        }
    .end annotation
.end field


# instance fields
.field private b:Landroid/content/Context;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .prologue
    .line 35
    const-class v0, Lcom/instagram/android/c2dm/a/a;

    sput-object v0, Lcom/instagram/android/c2dm/a/a;->a:Ljava/lang/Class;

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;)V
    .locals 0
    .parameter

    .prologue
    .line 38
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 39
    iput-object p1, p0, Lcom/instagram/android/c2dm/a/a;->b:Landroid/content/Context;

    .line 40
    return-void
.end method


# virtual methods
.method public a(Ljava/lang/String;Ljava/util/List;)Landroid/app/Notification;
    .locals 3
    .parameter
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/lang/String;",
            "Ljava/util/List",
            "<",
            "Lcom/instagram/android/c2dm/d;",
            ">;)",
            "Landroid/app/Notification;"
        }
    .end annotation

    .prologue
    .line 45
    iget-object v0, p0, Lcom/instagram/android/c2dm/a/a;->b:Landroid/content/Context;

    invoke-virtual {p0}, Lcom/instagram/android/c2dm/a/a;->a()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1, p1, p2}, Lcom/instagram/android/c2dm/a/c;->a(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;)Landroid/support/v4/app/at;

    move-result-object v0

    .line 55
    invoke-interface {p2}, Ljava/util/List;->size()I

    move-result v1

    const/4 v2, 0x1

    if-ne v1, v2, :cond_0

    .line 56
    invoke-virtual {v0}, Landroid/support/v4/app/at;->a()Landroid/app/Notification;

    move-result-object v0

    .line 62
    :goto_0
    return-object v0

    .line 58
    :cond_0
    new-instance v1, Landroid/support/v4/app/au;

    invoke-direct {v1, v0}, Landroid/support/v4/app/au;-><init>(Landroid/support/v4/app/at;)V

    .line 59
    iget-object v0, p0, Lcom/instagram/android/c2dm/a/a;->b:Landroid/content/Context;

    sget v2, Lcom/facebook/ba;->directshare_notification_permalink_aggregated:I

    invoke-virtual {v0, v2}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v1, v0}, Landroid/support/v4/app/au;->a(Ljava/lang/CharSequence;)Landroid/support/v4/app/au;

    .line 61
    invoke-static {v1, p2}, Lcom/instagram/android/c2dm/a/c;->a(Landroid/support/v4/app/au;Ljava/util/List;)V

    .line 62
    invoke-virtual {v1}, Landroid/support/v4/app/au;->a()Landroid/app/Notification;

    move-result-object v0

    goto :goto_0
.end method

.method public a(Ljava/util/Map;Ljava/lang/String;)Landroid/app/Notification;
    .locals 6
    .parameter
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/Map",
            "<",
            "Ljava/lang/String;",
            "Ljava/util/List",
            "<",
            "Lcom/instagram/android/c2dm/d;",
            ">;>;",
            "Ljava/lang/String;",
            ")",
            "Landroid/app/Notification;"
        }
    .end annotation

    .prologue
    const/4 v5, 0x1

    .line 84
    iget-object v0, p0, Lcom/instagram/android/c2dm/a/a;->b:Landroid/content/Context;

    invoke-virtual {p0}, Lcom/instagram/android/c2dm/a/a;->a()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/instagram/android/c2dm/a/c;->a(Landroid/content/Context;Ljava/lang/String;)Landroid/content/Intent;

    move-result-object v0

    .line 86
    iget-object v1, p0, Lcom/instagram/android/c2dm/a/a;->b:Landroid/content/Context;

    invoke-static {v1, v0}, Lcom/instagram/android/c2dm/a/c;->a(Landroid/content/Context;Landroid/content/Intent;)Landroid/app/PendingIntent;

    move-result-object v0

    .line 89
    new-instance v1, Landroid/content/Intent;

    iget-object v2, p0, Lcom/instagram/android/c2dm/a/a;->b:Landroid/content/Context;

    const-class v3, Lcom/instagram/android/activity/MainTabActivity;

    invoke-direct {v1, v2, v3}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 90
    const/high16 v2, 0x400

    invoke-virtual {v1, v2}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;

    .line 92
    new-instance v2, Landroid/net/Uri$Builder;

    invoke-direct {v2}, Landroid/net/Uri$Builder;-><init>()V

    const-string v3, "ig"

    invoke-virtual {v2, v3}, Landroid/net/Uri$Builder;->scheme(Ljava/lang/String;)Landroid/net/Uri$Builder;

    move-result-object v2

    const-string v3, "inbox"

    invoke-virtual {v2, v3}, Landroid/net/Uri$Builder;->authority(Ljava/lang/String;)Landroid/net/Uri$Builder;

    move-result-object v2

    invoke-virtual {v2}, Landroid/net/Uri$Builder;->build()Landroid/net/Uri;

    move-result-object v2

    invoke-virtual {v1, v2}, Landroid/content/Intent;->setData(Landroid/net/Uri;)Landroid/content/Intent;

    .line 98
    iget-object v2, p0, Lcom/instagram/android/c2dm/a/a;->b:Landroid/content/Context;

    const v3, 0xfb16

    const/high16 v4, 0x800

    invoke-static {v2, v3, v1, v4}, Landroid/app/PendingIntent;->getActivity(Landroid/content/Context;ILandroid/content/Intent;I)Landroid/app/PendingIntent;

    move-result-object v1

    .line 104
    new-instance v2, Landroid/support/v4/app/at;

    iget-object v3, p0, Lcom/instagram/android/c2dm/a/a;->b:Landroid/content/Context;

    invoke-direct {v2, v3}, Landroid/support/v4/app/at;-><init>(Landroid/content/Context;)V

    invoke-virtual {v2, v1}, Landroid/support/v4/app/at;->a(Landroid/app/PendingIntent;)Landroid/support/v4/app/at;

    move-result-object v1

    invoke-virtual {v1, v5}, Landroid/support/v4/app/at;->b(Z)Landroid/support/v4/app/at;

    move-result-object v1

    invoke-interface {p1}, Ljava/util/Map;->size()I

    move-result v2

    invoke-static {v2}, Ljava/lang/Integer;->toString(I)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Landroid/support/v4/app/at;->c(Ljava/lang/CharSequence;)Landroid/support/v4/app/at;

    move-result-object v1

    iget-object v2, p0, Lcom/instagram/android/c2dm/a/a;->b:Landroid/content/Context;

    sget v3, Lcom/facebook/ba;->app_name:I

    invoke-virtual {v2, v3}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Landroid/support/v4/app/at;->a(Ljava/lang/CharSequence;)Landroid/support/v4/app/at;

    move-result-object v1

    iget-object v2, p0, Lcom/instagram/android/c2dm/a/a;->b:Landroid/content/Context;

    sget v3, Lcom/facebook/ba;->directshare_notification_inbox_aggregated:I

    invoke-virtual {v2, v3}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Landroid/support/v4/app/at;->b(Ljava/lang/CharSequence;)Landroid/support/v4/app/at;

    move-result-object v1

    invoke-virtual {v1, v0}, Landroid/support/v4/app/at;->b(Landroid/app/PendingIntent;)Landroid/support/v4/app/at;

    move-result-object v0

    sget v1, Lcom/facebook/av;->notification_icon:I

    invoke-virtual {v0, v1}, Landroid/support/v4/app/at;->a(I)Landroid/support/v4/app/at;

    move-result-object v1

    .line 113
    if-eqz p2, :cond_0

    .line 114
    invoke-interface {p1, p2}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/util/List;

    .line 115
    if-eqz v0, :cond_0

    .line 116
    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v2

    add-int/lit8 v2, v2, -0x1

    invoke-interface {v0, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/instagram/android/c2dm/d;

    .line 117
    invoke-virtual {v0}, Lcom/instagram/android/c2dm/d;->d()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Landroid/support/v4/app/at;->d(Ljava/lang/CharSequence;)Landroid/support/v4/app/at;

    .line 119
    const-string v2, "default"

    invoke-virtual {v0}, Lcom/instagram/android/c2dm/d;->m()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 120
    invoke-virtual {v1, v5}, Landroid/support/v4/app/at;->b(I)Landroid/support/v4/app/at;

    .line 126
    :cond_0
    new-instance v2, Landroid/support/v4/app/au;

    invoke-direct {v2}, Landroid/support/v4/app/au;-><init>()V

    .line 127
    invoke-interface {p1}, Ljava/util/Map;->entrySet()Ljava/util/Set;

    move-result-object v0

    invoke-interface {v0}, Ljava/util/Set;->iterator()Ljava/util/Iterator;

    move-result-object v3

    :goto_0
    invoke-interface {v3}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-eqz v0, :cond_1

    invoke-interface {v3}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/util/Map$Entry;

    .line 128
    invoke-interface {v0}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/util/List;

    .line 130
    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v4

    add-int/lit8 v4, v4, -0x1

    invoke-interface {v0, v4}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/instagram/android/c2dm/d;

    .line 131
    invoke-virtual {v0}, Lcom/instagram/android/c2dm/d;->c()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v2, v0}, Landroid/support/v4/app/au;->b(Ljava/lang/CharSequence;)Landroid/support/v4/app/au;

    goto :goto_0

    .line 134
    :cond_1
    invoke-virtual {v1, v2}, Landroid/support/v4/app/at;->a(Landroid/support/v4/app/ba;)Landroid/support/v4/app/at;

    .line 136
    invoke-virtual {v1}, Landroid/support/v4/app/at;->a()Landroid/app/Notification;

    move-result-object v0

    return-object v0
.end method

.method public a(Ljava/lang/String;)Lcom/instagram/android/c2dm/d;
    .locals 1
    .parameter

    .prologue
    .line 146
    invoke-static {}, Lcom/instagram/android/service/f;->a()Lcom/instagram/android/service/f;

    move-result-object v0

    .line 147
    invoke-static {v0, p1}, Lcom/instagram/android/c2dm/f;->a(Lcom/instagram/android/service/f;Ljava/lang/String;)Lcom/instagram/android/c2dm/d;

    move-result-object v0

    return-object v0
.end method

.method public a()Ljava/lang/String;
    .locals 1

    .prologue
    .line 68
    const-string v0, "directshare"

    return-object v0
.end method

.method public a(Lcom/instagram/android/c2dm/d;)Ljava/lang/String;
    .locals 1
    .parameter

    .prologue
    .line 141
    invoke-virtual {p1}, Lcom/instagram/android/c2dm/d;->p()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public bridge synthetic a(Ljava/lang/Object;)Ljava/lang/String;
    .locals 1
    .parameter

    .prologue
    .line 33
    check-cast p1, Lcom/instagram/android/c2dm/d;

    invoke-virtual {p0, p1}, Lcom/instagram/android/c2dm/a/a;->a(Lcom/instagram/android/c2dm/d;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public a(I)Z
    .locals 1
    .parameter

    .prologue
    .line 77
    const/4 v0, 0x2

    if-lt p1, v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public b()Landroid/content/SharedPreferences;
    .locals 1

    .prologue
    .line 152
    sget-object v0, Lcom/instagram/android/c2dm/a/a;->a:Ljava/lang/Class;

    invoke-virtual {v0}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcom/instagram/m/b/a/a;->a(Ljava/lang/String;)Landroid/content/SharedPreferences;

    move-result-object v0

    return-object v0
.end method

.method public synthetic b(Ljava/lang/String;)Ljava/lang/Object;
    .locals 1
    .parameter

    .prologue
    .line 33
    invoke-virtual {p0, p1}, Lcom/instagram/android/c2dm/a/a;->a(Ljava/lang/String;)Lcom/instagram/android/c2dm/d;

    move-result-object v0

    return-object v0
.end method
